package cn.javass.dp.chianofresponsibility.example4;

/**
 * 职责链接口 也就是处理请求的接口
 */
public abstract class Handle {

    /**
     * 持有后继的职责对象
     */
    protected Handle successor;

    public void setSuccessor(Handle successor) {
        this.successor = successor;
    }

    /**
     * 处理聚餐费用的申请
     * @param user
     * @param fee
     * @return 成功或失败的具体通知
     */
    public abstract String handleFeeRequest(String user, double fee);


    /**
     * 预支差旅费
     * @param user
     * @param requestNum
     * @return
     */
    public abstract boolean handlePreFeeRequest(String user, double requestNum);
}
